import request from '../request'

// 各科室单月直接成本表
export function getAllBaseCostByDate(params) {
  return request({
    url: 'baseCost/getAllBaseCostByDate',
    method: 'POST',
    data: params
  })
}

// 各科室单月直接成本表-根据年月获取账套信息
export function getAcSetSource(params) {
  return request({
    url: `etlAcSet/getAcSetSource`,
    method: 'POST',
    data: params
  })
}
// // 各科室单月直接成本表-根据父级科室获取子科室的人员经费详情（人员经费1级），按照账套分组
// export function listSalaryWithAccByPDeptCode(params, pDeptCode) {
//     return request({
//         url: `baseSalary2021/listSalaryWithAccByPDeptCode/${pDeptCode}`,
//         method: 'POST',
//         data: params
//     })
// }

// 各科室单月直接成本表-根据父级科室获取子科室的人员经费详情（人员经费1级），按照账套分组
export function listSalaryWithExtraByPDeptCode(params, pDeptCode) {
  return request({
    url: `/baseSalary2021/listSalaryWithExtraByPDeptCode/${pDeptCode}`,
    method: 'POST',
    data: params
  })
}

export function listCostItemByDate(params) {
  return request({
    url: `rdCostsalaryrelation/listCostItemByDate`,
    method: 'POST',
    data: params
  })
}

export function listSalaryDetailByDateAndPDeptAndDept(params, pDeptCode, deptCode) {
  return request({
    url: `baseSalary2021/listSalaryDetailByDateAndPDeptAndDept/${pDeptCode}/${deptCode}`,
    method: 'POST',
    data: params
  })
}

export function listPerformanceDetailByDateAndPDeptAndDept(params, pDeptCode, deptCode) {
  return request({
    url: `baseSalary2021/listPerformanceDetailByDateAndPDeptAndDept/${pDeptCode}/${deptCode}`,
    method: 'POST',
    data: params
  })
}

// 各科室单月直接成本表-人员经费二级明细，点击子科室，根据父级科室+子科室编号获取人员经费明细（根据人员）
export function listSalaryByPDeptCodeAndDeptCode(params, pDeptCode, deptCode) {
  return request({
    url: `baseSalary2021/listSalaryByPDeptCodeAndDeptCode/${pDeptCode}/${deptCode}`,
    method: 'POST',
    data: params
  })
}

// 各科室单月直接成本表-人员经费二级明细，点击账套，根据父级科室+子科室+账套显示人员经费明细（根据成本项目）
export function listSalaryByDeptAndAccId(params, pDeptCode, deptCode, accId) {
  return request({
    url: `baseSalary2021/listSalaryByDeptAndAccId/${pDeptCode}/${deptCode}/${accId}`,
    method: 'POST',
    data: params
  })
}
// 各科室单月直接成本表-根据时间+父级科室代码获得 固定资产折旧 / 无形资产摊销 明细
export function listDepreciationByPDeptCode(params, pDeptCode) {
  return request({
    url: `etlDepreciationDetail/listDepreciationByPDeptCode/${pDeptCode}`,
    method: 'POST',
    data: params
  })
}

// 各科室单月直接成本表-获取首页列表
export function listBaseCostGroupDept(params) {
  return request({
    url: '/baseCost/listBaseCostGroupDept',
    method: 'POST',
    data: params
  })
}
// 各科室单月直接成本表-获取某个科室下的数据
export function listBaseCostByPDeptCode(params, DeptCode) {
  return request({
    url: `baseCost/listBaseCostByPDeptCode/${DeptCode}`,
    method: 'POST',
    data: params
  })
}
// 各科室单月直接成本表-获取药品费下的数据
export function listDrugCostByPDeptCode(params, pDeptCode) {
  return request({
    url: `baseCost/listCostByPDeptCodeAndUnitCode/${pDeptCode}`,
    method: 'POST',
    data: params
  })
}

// 各科室单月直接成本表-科室代码-药品费用
export function listDrugCostByDeptCode(params, deptCode) {
  return request({
    url: `baseCost/listCostByDeptCodeAndUnitCode/${deptCode}`,
    method: 'POST',
    data: params
  })
}

// 临床服务类科室全成本表
export function listAmortizationDataByDate(params) {
  return request({
    url: `amortizationData/listAmortizationDataByDate`,
    method: 'POST',
    data: params
  })
}
// 临床服务类科室全成本表-科室下的数据
export function listAmortizationDataByPDeptCode(params, pDeptCode) {
  return request({
    url: `amortizationData/listAmortizationDataByPDeptCode/${pDeptCode}`,
    method: 'POST',
    data: params
  })
}
// 收益总表（财政补贴）-数据列表
export function listCountInCome(params, pDeptCode) {
  return request({
    url: `amortizationData/listCountInCome`,
    method: 'POST',
    data: params
  })
}
// 各科室直接成本表（按成本项目汇总）
export function listBaseCostWithCostItem(params, pDeptCode) {
  return request({
    url: `baseCost/listBaseCostWithCostItem`,
    method: 'POST',
    data: params
  })
}
// 核算科室收入成本汇总表（核算定义）
export function listCostWithPDept(params, pDeptCode) {
  return request({
    url: `baseCost/listCostWithPDept`,
    method: 'POST',
    data: params
  })
}
// 核算科室收入成本汇总表（核算单元）
export function listCostWithDept(params, pDeptCode) {
  return request({
    url: `baseCost/listCostWithDept`,
    method: 'POST',
    data: params
  })
}
// 各科室全成本表（会计分类汇总）
export function listAmortizationDataWithAccount(params) {
  return request({
    url: `amortizationData/listAmortizationDataWithAccount`,
    method: 'POST',
    data: params
  })
}
// 获取支出项目名称对应的明细
export function listCostInfoByPDeptCodeAndUnitCode(params, dept) {
  return request({
    url: `baseCost/listCostInfoByPDeptCodeAndUnitCode/${dept}`,
    method: 'POST',
    data: params
  })
}

// 各科室单月直接成本表
export function downloadDeptPerMonth(params, dept) {
  return request({
    url: `baseCost/download`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
// 各科室单月直接成本表-单个科室
export function perDeptdownloadPerMonth(params, code) {
  return request({
    url: `baseCost/download/${code}`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 临床服务类科室成本表
export function download2(params, dept) {
  return request({
    url: `amortizationData/download2`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
// 临床服务类科室成本构成分析表
export function download3(params, dept) {
  return request({
    url: `amortizationData/download3`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
// 收益总表
export function download4(params, dept) {
  return request({
    url: `amortizationData/download4`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
// 各科室直接成本表（按成本项目汇总）
export function download5(params, dept) {
  return request({
    url: `baseCost/download5`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 各科室直接成本表（按会计分类汇总）
export function download6(params, dept) {
  return request({
    url: `amortizationData/download6`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 核算科室收入成本汇总表（核算定义）
export function download7(params, dept) {
  return request({
    url: `baseCost/download7`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
// 核算科室收入成本汇总表（核算单元）
export function download8(params, dept) {
  return request({
    url: `baseCost/download8`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}
// 规则对照-科室工资对应检查
export function getRubbing1(params) {
  return request({
    url: `/inspectionCheck/getRubbing1`,
    method: 'post',
    data: params
  })
}

// 规则对照-his科室检查
export function getRubbing2(params) {
  return request({
    url: `/inspectionCheck/getRubbing2`,
    method: 'post',
    data: params
  })
}
// 规则对照-用友科室检查
export function getRubbing3(params) {
  return request({
    url: `/inspectionCheck/getRubbing3`,
    method: 'post',
    data: params
  })
}

// 成本分析-人员经费
export function listSalaryWithExtraByDeptCode(params, deptCode) {
  return request({
    url: `/baseSalary2021/listSalaryWithExtraByDeptCode/${deptCode}`,
    method: 'post',
    data: params
  })
}
// 成本分析-卫生材料
export function listMaterialsCategorySummary(params, deptCode) {
  return request({
    url: `/baseCost/listMaterialsCategorySummary/${deptCode}`,
    method: 'post',
    data: params
  })
}

// 成本分析-药品费
export function listCostByDeptCodeAndUnitCode(params, deptCode) {
  return request({
    url: `/baseCost/listCostByDeptCodeAndUnitCode/${deptCode}`,
    method: 'post',
    data: params
  })
}

// 成本分析-固定资产折旧、无形资产摊销
export function etlDepreciationDetail(params, deptCode) {
  return request({
    url: `/etlDepreciationDetail/listDepreciationByDeptCode/${deptCode}`,
    method: 'post',
    data: params
  })
}

// 各科室全成本表（会计分类汇总）-列表
export function listBaseCostDeptByDate(params, deptCode) {
  return request({
    url: `/baseCost/listBaseCostDeptByDate`,
    method: 'post',
    data: params
  })
}

// 各科室全成本表（会计分类汇总）-导出
export function download10(params, deptCode) {
  return request({
    url: `/baseCost/download10`,
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}

// 业务科室收支汇总表-列表
export function listAllBaseCost(params, deptCode) {
  return request({
    url: `/baseInCome/listAllBaseCost`,
    method: 'post',
    data: params
  })
}

// 业务科室收支汇总表-导出
export function downloadywdpt(params, deptCode) {
  return request({
    url: `/baseInCome/download`,
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}

// 季度科室成本表-列表

export function getDeptBaseCost(params, deptCode) {
  return request({
    url: `/baseCost/getDeptBaseCost`,
    method: 'post',
    data: params
  })
}

// 季度科室成本表-导出
export function downloadJd(params, deptCode) {
  return request({
    url: `/baseCost/download11`,
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}

// 业务科室收支汇总表-列表

export function listALLBaseCostByZDept(params, deptCode) {
  return request({
    url: `/baseInCome/listALLBaseCostByZDept`,
    method: 'post',
    data: params
  })
}

// 业务科室收支汇总表-导出
export function zydeptdownload1(params, deptCode) {
  return request({
    url: `/baseInCome/download1`,
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}

